# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI=3

inherit distutils eutils

MY_PN="worklogplugin"
MY_P="${MY_PN}-${PV}"
DESCRIPTION="Trac plugin that adds a Work Log capability."
HOMEPAGE="http://trac-hacks.org/wiki/WorkLogPlugin"
SRC_URI="http://trac-hacks.org/changeset/latest/${MY_PN}/${PV}?old_path=/&format=zip -> ${P}.zip"

LICENSE="BSD"
SLOT="0"
KEYWORDS="~x86"
IUSE=""

DEPEND="app-arch/unzip"
RDEPEND="www-apps/trac"

S="${WORKDIR}/${MY_PN}/${PV}"

pkg_postinst() {
	elog "To install the plugin for a desired environment \"foo\""
	elog "add this to its trac.ini:"
	elog "[components]"
	elog "worklog.* = enabled"
	elog ""
	elog "It is then required to upgrade the database:"
	elog "trac-admin /path/to/foo upgrade"
	elog ""
	elog "Restarting the webservice is required."
}
